import { createRouter, createWebHistory } from 'vue-router'
import HomePageComponent from '../components/index/body/HomePageComponent.vue'
import WeiXinHomePageView from '../views/WeiXinHomePageView.vue'
import WalletTransfer from '../components/wallettransfer/wallettransfer.vue'
import Collection from '../components/QR-code/Collection.vue'
import SelectMerchant from '../components/select-merchant/SelectMerchant.vue'
import ScanCodePayment from '../components/scancode-payment/scancodepayment.vue'
import NFCpayment from '../components/NFCpayment/NFCPayment.vue'
import Collectionpayment from '../components/collection-payment/CollectionPaymentChild.vue'
import Personalsettings from '../components/personal-settings/PersonalSettings.vue'
import Fingerprint from '../components/fingerprint/Fingerprint.vue'
import Paylastpassword from '../components/pay-password/paylastPassword.vue'
import PaymentPassword from '../components/pay-password/paymentPassword.vue'
// import { createRouter, createWebHistory } from 'vue-router' 
import LoginView from '../views/LoginView.vue'
import cardCredit from '../components/bankcard/cardCredit.vue'
import cardInfo from '../components/bankcard/cardInfo.vue'
import cardBind from '../components/bankcard/cardInfoBind.vue'
import cardAll from '../components/bankcard/cardAll.vue'
import cardBound from '../components/bankcard/cardBound.vue'
import recharge from '../components/bankcard/recharge.vue'
import withdrawal from '../components/bankcard/withdrawal.vue'
import ransactionRecords from '../components/transaction/ransactionRecords.vue'
import payInfo from '../components/pay-password/payInfo.vue'
import payPassword from '../components/pay-password/payPassword.vue'
import payLimit from '../components/pay-password/payLimit.vue'
import RegisterView from '../views/RegisterView.vue'
import PersonCenter from '../components/person-center/PersonCenter.vue'
import ForgetPassword from '../components/login/ForgetPassword.vue'
import ChangeForgetPassword from '../components/login/ChangeForgetPassword.vue'
import LoginPassword from '../components/login/LoginPassword.vue'
import LoginPasswordChange from '../components/login/LoginPasswordChange.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    { //登录
      path: '/login',
      name: 'login',
      component: LoginView
    },{//注册
      path: '/register',
      name: 'register',
      component: RegisterView
    },{//忘记密码
      path: '/forget-password',
      name: 'ForgetPassword',
      component: ForgetPassword
    },{//设置新密码
      path: '/change-forget-password',
      name: 'ChangeForgetPassword',
      component: ChangeForgetPassword
    },{
      //默认主页面跳转路径
      path: '/',
      component: WeiXinHomePageView,
      children: [{ //主页面
        path: '/',
        name: 'HomePageComponent',
        component: HomePageComponent
      },{ //个人中心
        path: '/person-center',
        name: 'PersonCenter',
        component: PersonCenter
      }, {//钱包转账
        path: '/wallet-transfer',
        name: 'wallettransfer',
        component: WalletTransfer
      }, {//收钱
        path: '/collection',
        name: 'collection',
        component: Collection
      }, {//选择商户付款
        path: '/select-merchant-payment',
        name: 'selectmerchantpayment',
        component: SelectMerchant
      }, {//扫码付款
        path: '/scan-code-payment',
        name: 'scancodepayment',
        component: ScanCodePayment
      }, {//NFC支付
        path: '/NFCpayment',
        name: 'NFCpayment',
        component: NFCpayment
      }, {//收付款
        path: '/collection-payment',
        name: 'collectionpayment',
        component: Collectionpayment
      }, {//个人设置
        path: '/personal-settings',
        name: 'personalsettings',
        component: Personalsettings
      }, {//安全设置（指纹）
        path: '/fingerprint',
        name: 'fingerprint',
        component: Fingerprint
      }, {//银行卡详情
        path: 'card-info',
        name: 'cardinfo',
        component: cardInfo
      }, {//查看信用卡信息
        path: 'card-info-credit',
        name: 'cardCredit',
        component: cardCredit
      }, {//绑定/解绑银行卡
        path: 'card-bind',
        name: 'cardBind',
        component: cardBind
      }, { //所有银行卡
        path: 'card-all',
        name: 'cardAll',
        component: cardAll
      }, {//已绑定银行卡
        path: 'card-bound',
        name: 'cardBound',
        component: cardBound
      }, {//选择充值银行卡
        path: 'recharge',
        name: 'recharge',
        component: recharge
      }, {//选择提现银行卡
        path: 'withdrawal',
        name: 'withdrawal',
        component: withdrawal
      }, {//交易记录
        path: 'ransaction-records',
        name: 'ransactionRecords',
        component: ransactionRecords
      }, {//付款详情
        path: 'payInfo',
        name: 'payInfo',
        component: payInfo
      }, {//设置支付密码
        path: 'pay-password-setting',
        name: 'payPassword',
        component: payPassword
      }, {//设置支付金额
        path: 'pay-limit',
        name: 'payLimit',
        component: payLimit
      }, {//输入原来密码
        path: '/pay-last-password',
        name: 'payLastPassword',
        component: Paylastpassword
      },{//输入支付密码
        path:'/payment-password',
        name:'paymentPassword',
        component:PaymentPassword
      },{//输入原先登录密码
        path:'/login-password',
        name:'LoginPassword',
        component:LoginPassword
      },{//输入修改的密码
        path:'/login-password-change',
        name:'LoginPasswordChange',
        component:LoginPasswordChange
      }]
    }
  ]
})

export default router
